<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/index/text4.css" />
		<style>
		</style>
	</head>

	<body>
		<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
			<div class="mui-content">
			  <div class="mui-row box-top" id="reback">
			        <div class="mui-col-sm-6 mui-col-xs-12 title-box">
			            <i class="mui-icon mui-icon-back"></i>
			        </div>
			        <div class="mui-col-sm-6 mui-col-xs-12">
			        </div>
			    </div>
			</div>
			<!--  -->
			<div id="gps-show"></div>
			<div class="caremam-btn-con">
				<div class="mui-row box-top" id="reback">
			        <div class="mui-col-sm-12 mui-col-xs-12">
			            <button type="button" class="mui-btn mui-btn-success" onclick="getGEO_status()" id="blool">GPS</button>
			        </div>
			 	</div>
			</div>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script>
		mui.init();
		document.getElementById('reback').addEventListener('tap', function() {
				mui.back()
		})
		
		function getGEO_status(){
            var context = plus.android.importClass("android.content.Context");
            var locationManager=plus.android.importClass("android.location.LocationManager");
            var main=plus.android.runtimeMainActivity();
            var mainSvr=main.getSystemService(context.LOCATION_SERVICE);
            var check = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
            if (!check) {
            	mui.alert('请打开您的GPS服务', '提示', ['确定'], null, 'div')
            } else {
            	mui.alert('GPS已打开', '提示', ['确定'], null,'div')
            }
        }
	</script>
</html>